<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>Simulations for Statistical and Thermal Physics</title>

<link href="../../default.css" type="text/css" rel="stylesheet">

</head>

<body>
<h3 style="text-align:center;">Two-dimensional random walk</h3>

<p class="header_title">Introduction</p>


<p>A number of random walkers start from the origin of a square lattice and simultaneously move randomly 
in one of four directions. You can choose
the probabilities of a step in each of the four directions subject to the normalization condition that the sum of the probabilities is unity.</p>
<center>
<applet
 code="org.opensourcephysics.davidson.applets.ApplicationApplet.class"
 archive="./stp.jar" codebase="../" align="top" height="40"
 hspace="0" vspace="0" width="150"> <param name="target"
 value="org.opensourcephysics.stp.randomwalk.randomwalk2.TwoDimensionalWalkApp"> <param name="title"
 value="Applet"> <param name="singleapp" value="true">
</applet>
</center>

<p class="header_title">Problems</p>

<ol>

<li>Consider the walkers as a swarm of bees that are doing a random walk. Run the simulation and look at the resulting swarm 
of bees as they move. Describe the shape of the
swarm if 
the probabilities of a step in any of the four directions are equal.</li>

<li> Roughly estimate the radius of the swarm as a function of time. You
can determine
the coordinates of any point on the swarm by clicking on the point with
the mouse.</li>

<li> The histogram H(r) counts the number of walkers at a given time that are a radial distance between r and &#916;r. What is the qualitative dependence of H(r) on r? How does it differ from the histogram H(x) for the one-dimensional random walk? How does the histogram
change with the number of steps?</li>

<li>You can obtain the histogram data in tabular form under the <tt>Views</tt>
menu. Use this data to
compute the mean square displacement &#8721;<sub>r</sub> r<sup>2</sup> P(r), where P(r) is the normalized histogram. Repeat
for a
number of different times and 
plot the mean square displacement versus time. Do you obtain the
expected linear behavior for this
plot?</li>

<li>Change the step probabilities so that the probability to move
left is different than to move
right, but the up and down probabilities are the same. (For example, set
pLeft = 0.15 and pRight = 0.35.) 
Estimate the position of 
the center of the swarm as a function of time. Does it move linearly
with respect to 
time or linearly with respect to the square root of the time? Explain your
result.</li>

</ol>

<p class="header_title">Java Classes</p>

<ul>

<li>TwoDimensionalWalkApp</li>

</ul>

<p class = "small">Updated 28 February 2007.</p>
</body>
</html>